/* 按钮基础样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    gap: var(--spacing-sm);
}

/* 按钮尺寸 */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius-sm);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    border-radius: var(--border-radius-md);
}

/* 按钮主题 */
.btn-primary {
    color: var(--bg-white);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-dark) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}

.btn-success {
    color: var(--bg-white);
    background: linear-gradient(135deg, var(--color-success) 0%, #45a049 100%);
    border-color: var(--color-success);
}

.btn-success:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
}

.btn-danger {
    color: var(--bg-white);
    background: linear-gradient(135deg, var(--color-danger) 0%, #c82333 100%);
    border-color: var(--color-danger);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
}

/* 新增按钮特殊样式 */
.add-button {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    background: linear-gradient(135deg, var(--color-success) 0%, #45a049 100%);
    border: none;
    color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

/* 按钮图标 */
.btn i {
    font-size: 0.9em;
}

/* 按钮组 */
.btn-group {
    display: inline-flex;
    gap: var(--spacing-sm);
}

/* 按钮加载状态 */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--bg-white);
    border-radius: 50%;
    border-right-color: transparent;
    animation: button-loading-spinner 0.75s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* 禁用状态 */
.btn:disabled,
.btn.disabled {
    opacity: 0.65;
    pointer-events: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* 模态框中的按钮 */
.modal-footer .btn {
    min-width: 80px;
}

/* 表格中的操作按钮 */
.table .btn {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.875rem;
} 